/*
 This class is general standard for listener, In order to use listener, you 
 need to assign variables:
 - Handler object (ex: Student, Teacher...)
 - Handler functions (ex: read, write, teach...), use defined-macro called 
 ug_listener_func(YOUR_SELECTOR) to create a handler function.
 */

#ifndef UG_LISTENER_H
#define UG_LISTENER_H

#include "cocos2d.h"
#include "../platform/UGCustomMacros.h"

USING_NS_CC;

typedef void (CCObject::*UGListenerFunc)(Ref*);
	#define ug_listener_func(_SELECTOR) (UGListenerFunc)(&_SELECTOR)

namespace ugame {
    class UGListener : public Ref {
        UG_PROPERTY_FULL(Ref*, handlerObj, HandlerObj);
    public:
        UGListener();
        ~UGListener();
    };
}

#endif
